<%@ page contentType="text/html;charset=UTF-8" language="java" isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>添加用户</title>
    <style>
        :root {
            --primary: #4CAF50; /* 主绿色 */
            --primary-light: #E8F5E9; /* 浅绿色背景 */
            --primary-dark: #388E3C; /* 深绿色 */
            --bg-color: #F8FBF8; /* 极浅背景 */
            --card-color: #FFFFFF; /* 卡片白色 */
            --text-dark: #2E7D32; /* 深绿色文字 */
            --text-light: #757575; /* 灰色文字 */
            --border: #C8E6C9; /* 浅绿色边框 */
        }

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Helvetica Neue', Arial, 'Microsoft YaHei', sans-serif;
        }

        body {
            background-color: var(--bg-color);
            color: #333;
            padding: 30px;
            line-height: 1.6;
        }

        .container {
            max-width: 600px;
            margin: 0 auto;
        }

        h2 {
            color: var(--primary-dark);
            text-align: center;
            margin-bottom: 25px;
            font-size: 24px;
            position: relative;
            padding-bottom: 10px;
        }

        h2:after {
            content: "";
            position: absolute;
            bottom: 0;
            left: 50%;
            transform: translateX(-50%);
            width: 60px;
            height: 3px;
            background-color: var(--primary);
            border-radius: 3px;
        }

        .card {
            background-color: var(--card-color);
            border-radius: 10px;
            box-shadow: 0 3px 20px rgba(0, 150, 0, 0.08);
            padding: 30px;
            border: 1px solid var(--border);
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            margin-bottom: 8px;
            color: var(--text-dark);
            font-weight: 500;
        }

        input[type="text"],
        input[type="password"],
        input[type="tel"],
        input[type="number"],
        select {
            width: 100%;
            padding: 12px 15px;
            border: 1px solid var(--border);
            border-radius: 6px;
            font-size: 15px;
            transition: all 0.3s ease;
        }

        input[type="text"]:focus,
        input[type="password"]:focus,
        input[type="tel"]:focus,
        input[type="number"]:focus,
        select:focus {
            border-color: var(--primary);
            outline: none;
            box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
        }

        .btn-submit {
            display: block;
            width: 100%;
            padding: 12px;
            border-radius: 6px;
            background-color: var(--primary);
            color: white;
            font-size: 16px;
            font-weight: 500;
            border: none;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 30px;
        }

        .btn-submit:hover {
            background-color: var(--primary-dark);
            transform: translateY(-2px);
            box-shadow: 0 4px 8px rgba(0,0,0,0.1);
        }

        @media (max-width: 768px) {
            body {
                padding: 15px;
            }

            .card {
                padding: 20px;
            }
        }
    </style>
</head>
<body>
<div class="container">
    <h2>添加新用户</h2>
    <div class="card">
        <form action="${pageContext.request.contextPath}/user/add" method="post">
            <div class="form-group">
                <label for="username">用户名</label>
                <input type="text" id="username" name="username" required>
            </div>

            <div class="form-group">
                <label for="password">密码</label>
                <input type="password" id="password" name="password" required>
            </div>

            <div class="form-group">
                <label for="phone">电话</label>
                <input type="tel" id="phone" name="phone" required>
            </div>

            <div class="form-group">
                <label for="sex">性别</label>
                <select id="sex" name="sex" required>
                    <option value="">请选择性别</option>
                    <option value="男">男</option>
                    <option value="女">女</option>
                </select>
            </div>

            <div class="form-group">
                <label for="age">年龄</label>
                <input type="number" id="age" name="age" min="1" max="120" required>
            </div>

            <div class="form-group">
                <label for="height">身高 (cm)</label>
                <input type="number" id="height" name="height" step="0.01" min="50" max="250" required>
            </div>

            <div class="form-group">
                <label for="weight">体重 (kg)</label>
                <input type="number" id="weight" name="weight" step="0.01" min="20" max="200" required>
            </div>

            <button type="submit" class="btn-submit">添加用户</button>
        </form>
    </div>
</div>
</body>
</html>